<template>
<div>
    <el-result icon="success" title="成功提示" subTitle="请根据提示进行操作">
      <template slot="extra">
        <el-button type="primary" size="medium" @click="goback">关闭</el-button>
      </template>
    </el-result>
</div>
</template>

<script>
import {aliPay} from '@/api/order'
export default{
    name:'PageSuccess',
    data(){
        return{

        }
    },
    created(){
        var params=document.location.href.split('?')[1]
            let paramsObj = {};
            if (params){
            let paramsArr = params.split('&');
            for (let i = 0; i < paramsArr.length;i++){
            let param =paramsArr[i].split('=');
            paramsObj[param[0]]=param[1];
            }
            }
            let paramValue = paramsObj['out_trade_no']
            aliPay({order_id:paramValue})
    },
    methods:{
        goback(){
            window.close()
        }
    }
    
}
</script>
<style>

</style>